import Vue from 'vue'
import App from './App.vue'
import router from './router'
// 引入状态管理
import store from './vuex/store';
import './plugins/element.js'
import './plugins/vue-quill-editor.js'
import './plugins/vue-table-with-tree-grid.js'
import './assets/css/global.css'
import './assets/ali-icon/iconfont.css'

import VueQuillEditor from 'vue-quill-editor'

/* 导入富文本编辑器对应的样式 */
import 'quill/dist/quill.core.css' // import styles
import 'quill/dist/quill.snow.css' // for snow theme
import 'quill/dist/quill.bubble.css' // for bubble theme

/* 将富文本编辑器注册为全局可用的组件 */
Vue.use(VueQuillEditor)

//定义格式化价格的过滤器
Vue.filter('priceFormat',(price) => {

  return (price/100).toFixed(2)
})

/* 导入axios包 */
import axios from 'axios'
/* 设定axios的请求根目录 */
axios.defaults.baseURL = 'http://127.0.0.1:8091/'
Vue.prototype.$http = axios

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
